<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      
      xmlns:p="http://primefaces.org/ui">
      
      

      


  
  
  
  <h:head>SEARCH
<title>SEARCH</title>
  </h:head>
	<h:body>
	
<p:tabMenu activeIndex="1">  
    <p:menuitem value="FLIGHTS" url="http://localhost:8080/TravelDreamWeb/searchFlights.xhtml" icon="ui-icon-search"/>  
    <p:menuitem value="HOTELS" url="http://localhost:8080/TravelDreamWeb/searchHotel.xhtml"  icon="ui-icon-search" />  
    <p:menuitem value="EXCURSIONS" url="http://localhost:8080/TravelDreamWeb/searchExcursions.xhtml" icon="ui-icon-search"/>  
</p:tabMenu>  

	
	
	 
	<h:form>
<h5 style="font-size:large;">HOTELS</h5>
    </h:form>
    
<h:form style="font-size:x-small;">
   <p:dataTable id="dataTable" var="hotels" value="#{searchHotelBean.hotelsList}" widgetVar="hotelsListTable"   
           emptyMessage="No hotels found with given criteria" filteredValue="#{searchHotelBean.hotelsFiltered}"
           rowKey="#{hotels.idbasicproduct}"
           selection="#{searchHotelBean.selectedHotel}"
           selectionMode="single" >
           
           
           
            <p:column id="NAMEColumn" filterBy="name"  
                headerText="Name"  filterMatchMode="contains">  
            <h:outputText value="#{hotels.name}" />  
        
        
        </p:column>     
        
           
           
      
        <p:column id="CITYColumn" filterBy="city"  
                headerText="CITY" filterMatchMode="contains" >   
            <h:outputText value="#{hotels.city}" />  
        </p:column>  
  
       
                
         <p:column id="DATAINColumn" filterBy="datain"  
                headerText="Data In"  filterMatchMode="contains">  
            <h:outputText value="#{hotels.datain}" />  
        </p:column>  
         
        
         <p:column id="DATAOUTColumn" filterBy="dataout"  
                headerText="Data Out" filterMatchMode="contains">  
            <h:outputText value="#{hotels.dataout}" /> 
        </p:column>  
        
        
        
        
         
        
        
        
        <p:column id="PRICEColumn" filterBy="price"  
                headerText="Price" filterMatchMode="contains">  
            <h:outputText value="#{hotels.price}" />  
        </p:column>
        
        
        
        
        <p:column id="ROOMNUMBERColumn" filterBy="roomnumber"  
                headerText="Room Number"  filterMatchMode="contains">  
            <h:outputText value="#{hotels.roomnumber}" />  
        </p:column>
        
    </p:dataTable>  
      
    
      
       
     
      <p:dialog header="Results" modal="false" showEffect="fade" hideEffect="fade" widgetVar="dlg" closable="false" >  
        <h:panelGrid columns="2" id="display" update="dataTable">  
         <h:outputLabel value="operation succeeded, now you can view the selected package in your purchase list" />
           <p:commandButton value="Okay" update="dataTable" onclick="PF('dlg').hide()"/>
        </h:panelGrid>  
    </p:dialog>  
     
  <p:commandButton id="dynaButton" value="Actions" type="button"/>
  <p:tieredMenu overlay="true" trigger="dynaButton" my="left top" at="left bottom">
  <p:menuitem value="Purchase" action="#{searchHotelBean.purchaseHotel()}"  oncomplete="PF('dlg').show()" update="display"/>  
  
 
  </p:tieredMenu>
         
      
      
 
      
      
      
</h:form>	
	
	</h:body>
</html>